﻿using System;
using System.ServiceModel;

namespace WSU.Cheka.Duplex.Contracts
{
    [ServiceContract(CallbackContract = typeof(IResultCallback))]
    public interface ICalculation
    {
        // chekanote: although duplex communication is always associated with "One-Way" transmission
        // but it is not mandatory. for example, when you register to a publisher, maybe you want to have a acknowledge 
        // sending back, at that circumstance, you can use "request-response" transmission
        [OperationContract(IsOneWay = true)]
        void Add(float x, float y);

        [OperationContract(IsOneWay = true)]
        void Substract(float x, float y);

        [OperationContract(IsOneWay = true)]
        void Multiple(float x, float y);

        [OperationContract(IsOneWay = true)]
        void Divide(float x, float y);
    }
}
